<html>
<head><meta charset="utf-8"><title>Stabilizing Backtrace / Core Error Proof of Concept · project-error-handling · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/index.html">project-error-handling</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html">Stabilizing Backtrace / Core Error Proof of Concept</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="211291775"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211291775" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211291775">(Sep 25 2020 at 17:56)</a>:</h4>
<p>attempting to kick this back into motion as best as I can</p>
<p>for people looking for background: <a href="https://github.com/rust-lang/project-error-handling/issues/3">https://github.com/rust-lang/project-error-handling/issues/3</a></p>
<p>Right now we need to figure out how to fix the coherence issues around the <code>From&lt;&amp;str&gt; for </code>Box&lt;dyn Error + Send + Sync + 'a&gt;<code> impl in </code>std`, which can no longer circumvent the orphan rule due to introduced crate boundaries. I feel like this might be an issue we need to communicate with the libs or lang teams to solve. cc <span class="user-mention" data-user-id="204346">@Ashley Mannix</span></p>



<a name="211291964"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211291964" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211291964">(Sep 25 2020 at 17:58)</a>:</h4>
<p>the options I can think of are:</p>
<ol>
<li>Focus on pushing for a merge of <code>std</code>, <code>alloc</code>, and <code>core</code></li>
<li>some sort of negative impl to circumvent the orphan rule and "promise" that <code>&amp;str</code> will never implement <code>std::error::Error</code>.</li>
<li>Wait for specialization so that these impls can overlap</li>
</ol>



<a name="211292155"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211292155" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211292155">(Sep 25 2020 at 17:59)</a>:</h4>
<p><span class="user-mention" data-user-id="220273">@Jane Lusby</span> I get the distinct impression that merging std and alloc and core isn't <em>incredibly</em> hard, it's just not something anyone is prepared to pick up and run with.</p>



<a name="211292177"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211292177" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211292177">(Sep 25 2020 at 17:59)</a>:</h4>
<p>(It's not <em>easy</em>, but the steps are more-or-less understood.)</p>



<a name="211292194"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211292194" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211292194">(Sep 25 2020 at 17:59)</a>:</h4>
<p>cool!</p>



<a name="211292305"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211292305" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211292305">(Sep 25 2020 at 18:00)</a>:</h4>
<p>If someone were prepared to take it on as their primary task for a couple of releases, I think it could be done without monumental effort.</p>



<a name="211292515"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211292515" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211292515">(Sep 25 2020 at 18:02)</a>:</h4>
<p>I definitely want to wait until we've talked through all the possible solutions and decided that that's the best one but if that ends up being the best way forward for our error trait issues then I think I'd be happy to take that on or mentor/shepherd any contributors who want to drive it to completion</p>



<a name="211292581"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211292581" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211292581">(Sep 25 2020 at 18:03)</a>:</h4>
<p><span class="user-mention" data-user-id="239881">@Josh Triplett</span> wait is the issue merging alloc and std or core and std?</p>



<a name="211292596"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211292596" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211292596">(Sep 25 2020 at 18:03)</a>:</h4>
<p>or all three?</p>



<a name="211292630"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211292630" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211292630">(Sep 25 2020 at 18:03)</a>:</h4>
<p>Alloc is "between" std and core. I don't think it'd be feasible to merge std and core without accounting for alloc.</p>



<a name="211292653"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211292653" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211292653">(Sep 25 2020 at 18:03)</a>:</h4>
<p>And the same mechanisms that would allow merging std and core will extend to alloc.</p>



<a name="211292816"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211292816" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211292816">(Sep 25 2020 at 18:04)</a>:</h4>
<p>The notion would be to have one crate for the standard library that has something like feature flags to determine whether it has core, core+alloc, or core+alloc+std.</p>



<a name="211292827"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211292827" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211292827">(Sep 25 2020 at 18:04)</a>:</h4>
<p>(And, in the future, more fine-grained distinctions than that.)</p>



<a name="211292836"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211292836" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211292836">(Sep 25 2020 at 18:05)</a>:</h4>
<p>gotchya</p>



<a name="211292927"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211292927" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211292927">(Sep 25 2020 at 18:05)</a>:</h4>
<p>You may want to talk to <span class="user-mention" data-user-id="120518">@Eric Huss</span> about cargo's <code>-Zbuild-std</code> features, which interact with this.</p>



<a name="211300633"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211300633" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211300633">(Sep 25 2020 at 19:05)</a>:</h4>
<p>The <code>From&lt;&amp;str&gt; for Box&lt;dyn Error + Send + Sync + 'a&gt;</code> could go to the <code>alloc</code> crate, but it _still_ triggers coherence (wrongly?). <code>Box&lt;dyn Error ...&gt;</code> is after all a concrete type and <code>Box</code> is defined in the same crate.</p>



<a name="211300913"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211300913" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211300913">(Sep 25 2020 at 19:07)</a>:</h4>
<p>In particular the error message says:</p>
<div class="codehilite"><pre><span></span><code>//      = note: upstream crates may add a new impl of trait `core::error::Error` for type `&amp;str` in future versions
</code></pre></div>


<p>but that seems irrelevant to me, whatever impls of the <code>Error</code> trait upstream or downstream crates add here do not matter because <code>Box&lt;dyn Error&gt;</code> is already a concrete type.</p>



<a name="211301063"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211301063" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211301063">(Sep 25 2020 at 19:08)</a>:</h4>
<p>Ah, my bad, forgot about <code> impl&lt;'a, E: Error + Send + Sync + 'a&gt; From&lt;E&gt; for Box&lt;dyn Error + Send + Sync + 'a&gt;</code></p>



<a name="211305008"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211305008" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211305008">(Sep 25 2020 at 19:26)</a>:</h4>
<p>I'm assuming we can't use <code>#[feature(min_specialization)]</code> to fix this one</p>



<a name="211305155"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211305155" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211305155">(Sep 25 2020 at 19:26)</a>:</h4>
<p>tho if we could specialize the <code>From&lt;E&gt;</code> impl on <code>Box&lt;dyn Error&gt;</code> that would be huge</p>



<a name="211305253"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211305253" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211305253">(Sep 25 2020 at 19:27)</a>:</h4>
<p>wait no nvm</p>



<a name="211305270"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211305270" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211305270">(Sep 25 2020 at 19:27)</a>:</h4>
<p>that wouldn't be that big of a deal</p>



<a name="211305291"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211305291" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211305291">(Sep 25 2020 at 19:27)</a>:</h4>
<p>the big one is <code>From&lt;T&gt; for T</code></p>



<a name="211308089"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211308089" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211308089">(Sep 25 2020 at 19:40)</a>:</h4>
<p>I think I tried the trivial thing but it didn't work.</p>



<a name="211308123"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211308123" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211308123">(Sep 25 2020 at 19:41)</a>:</h4>
<p>(i.e. adding a <code>default</code> to the methods of <code>impl&lt;'a, E: Error + Send + Sync + 'a&gt; From&lt;E&gt; for Box&lt;dyn Error + Send + Sync + 'a&gt;</code>.</p>



<a name="211331868"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211331868" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Sean Chen (he/him) <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211331868">(Sep 26 2020 at 00:24)</a>:</h4>
<p>The primary difference between <code>std</code> and <code>core</code> is that <code>core</code> doesn't have access to <code>alloc</code>, right? I was always under the impression that the two were distinct on purpose. Is that actually not the case? Is eventually merging the two actually a desirable outcome?</p>



<a name="211331888"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211331888" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211331888">(Sep 26 2020 at 00:25)</a>:</h4>
<blockquote>
<p>The primary difference between std and core is that core doesn't have access to alloc, right? </p>
</blockquote>
<p>I think this is accurate, though there are also a lot of OS integrations in std that aren't in core or alloc afaik</p>



<a name="211331936"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211331936" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211331936">(Sep 26 2020 at 00:26)</a>:</h4>
<p>I don't know the decision making process behind the split originally but my understanding is that its regarded as a mistake now, or at least it's no longer necessary</p>



<a name="211331942"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211331942" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211331942">(Sep 26 2020 at 00:26)</a>:</h4>
<p>If I had to guess I suspect the reason for the split was that we didn't have good support for conditionally compiling std</p>



<a name="211337937"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211337937" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ashley Mannix <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211337937">(Sep 26 2020 at 02:44)</a>:</h4>
<p>I actually don’t remember when the split first came about... That might be a fun bit of spelunking 🙂 <code>core</code> is kind of weird because it’s a bit of an arbitrarily selected subset of the standard library that is platform agnostic and considered fundamental. It’s not everything that doesn’t depend on an OS or a heap allocator. There are things that could be in <code>core</code> but aren’t. You’d kind of hope the majority of the standard traits would be in <code>core</code> but there are glaring omissions (<code>Error</code> being the biggest). I would _love_ to be able to unify the standard library crates, avoid all the coherence sadness between them and the clumsy effort libraries need to go through to be maximally portable</p>



<a name="211348430"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211348430" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jakub Duchniewicz <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211348430">(Sep 26 2020 at 08:01)</a>:</h4>
<p>Maybe I am speaking out of place here, but would merging <code>alloc</code> with <code>core</code> and <code>std</code> not be detrimental to the granularity with which developers can <code>compose</code> their Rust programs? <br>
Nevertheless, <code>Error</code>is a fundamental part of any language, and I strongly believe it would be useful to have it in <code>core</code></p>



<a name="211356992"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211356992" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211356992">(Sep 26 2020 at 12:03)</a>:</h4>
<p><span class="user-mention" data-user-id="344196">@Jakub Duchniewicz</span> not that I'm aware of</p>



<a name="211357055"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211357055" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211357055">(Sep 26 2020 at 12:05)</a>:</h4>
<p>that said ive not done much no_std work</p>



<a name="211358182"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211358182" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> DPC <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211358182">(Sep 26 2020 at 12:37)</a>:</h4>
<blockquote>
<p>Nevertheless, Error is a fundamental part of any language, and I strongly believe it would be useful to have it in core</p>
</blockquote>
<p>Definitely, but at the same time, Error is dependent on Display which is dependent on the Formatter and might not available in no_std environments</p>



<a name="211358312"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211358312" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ashley Mannix <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211358312">(Sep 26 2020 at 12:40)</a>:</h4>
<p><span class="user-mention" data-user-id="344196">@Jakub Duchniewicz</span> Actually I think the result could be giving libraries finer granularity to depend on just the capabilities they need entirely internally. I think most libraries I work on end up being unconditionally <code>no_std</code> because I don’t usually need <code>std</code>. But using Cargo features to opt in/out of <code>std</code> or <code>alloc</code> doesn’t feel ideal, since cross-cutting concerns like platform capabilities can be tricky to represent for all dependencies with the tools Cargo manifests give us</p>



<a name="211358376"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211358376" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211358376">(Sep 26 2020 at 12:42)</a>:</h4>
<p><span class="user-mention" data-user-id="120823">@DPC</span> isnt fmt already in core?</p>



<a name="211358380"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211358380" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ashley Mannix <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211358380">(Sep 26 2020 at 12:42)</a>:</h4>
<p><span class="user-mention" data-user-id="120823">@DPC</span> Thankfully <code>Display</code> is actually available in <code>core</code> <span aria-label="relieved" class="emoji emoji-1f60c" role="img" title="relieved">:relieved:</span></p>



<a name="211358404"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211358404" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ashley Mannix <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211358404">(Sep 26 2020 at 12:43)</a>:</h4>
<p>It does definitely still leave you to figure out _how_ to implement <code>fmt::Write</code> though</p>



<a name="211358586"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211358586" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ashley Mannix <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211358586">(Sep 26 2020 at 12:48)</a>:</h4>
<p>I guess most embedded code would format to like a serial port or something?</p>



<a name="211358779"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211358779" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ashley Mannix <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211358779">(Sep 26 2020 at 12:54)</a>:</h4>
<p><span class="user-mention" data-user-id="220273">@Jane Lusby</span> Am I right in my understanding that stabilizing backtrace as-is isn’t painting ourselves into any deeper corners with respect to <code>Error</code> in <code>core</code> than we’re already in?</p>



<a name="211358789"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211358789" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ashley Mannix <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211358789">(Sep 26 2020 at 12:54)</a>:</h4>
<p>I guess that’s what the prototypes aim to prove</p>



<a name="211358968"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211358968" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211358968">(Sep 26 2020 at 12:59)</a>:</h4>
<p><span class="user-mention" data-user-id="204346">@Ashley Mannix</span> as far as I can tell stabilizing backtrace won't pose an issue but I should look at <span class="user-mention" data-user-id="123586">@nagisa</span>'s PR more closely</p>



<a name="211359057"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211359057" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211359057">(Sep 26 2020 at 13:01)</a>:</h4>
<p>oh dang that branch removed bt</p>



<a name="211359072"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211359072" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211359072">(Sep 26 2020 at 13:01)</a>:</h4>
<p>so yea I still need to prototype doing a backtrace impl based on hooks</p>



<a name="211359129"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211359129" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211359129">(Sep 26 2020 at 13:02)</a>:</h4>
<p>I'm guessing that will still be necessary even with a core std merge otherwise the backtrace type might still depend on the alloc or os features</p>



<a name="211359147"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211359147" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211359147">(Sep 26 2020 at 13:03)</a>:</h4>
<p>gonna try working on that today</p>



<a name="211363579"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211363579" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211363579">(Sep 26 2020 at 14:52)</a>:</h4>
<p>One thing about Display and other format friends is that it's <em>often</em> very large on code size generated. To the point where people have crates with alternative formatting systems just to cut down on code size.</p>
<p>So throwing that requirement at all embedded folks is probably giving someone a pretty bad time.</p>



<a name="211366119"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211366119" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211366119">(Sep 26 2020 at 15:46)</a>:</h4>
<p><span class="user-mention" data-user-id="224471">@Lokathor</span> I think the generic member access RFC can solve that issue just fine</p>



<a name="211366129"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211366129" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211366129">(Sep 26 2020 at 15:47)</a>:</h4>
<p>hopefully doing empty unused <code>Display</code> and <code>Debug</code> impls isn't costly</p>



<a name="211366428"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211366428" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211366428">(Sep 26 2020 at 15:53)</a>:</h4>
<p>I'm not familiar with that RFC</p>



<a name="211366446"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211366446" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211366446">(Sep 26 2020 at 15:53)</a>:</h4>
<p><a href="https://github.com/yaahc/rfcs/blob/master/text/0000-dyn-error-generic-member-access.md">https://github.com/yaahc/rfcs/blob/master/text/0000-dyn-error-generic-member-access.md</a></p>



<a name="211366543"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211366543" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211366543">(Sep 26 2020 at 15:55)</a>:</h4>
<p>its introduces a new type kinda like Any but with support for passing values and trait objects too and uses that to essentially add a generic function for requesting data from errors by the type, so you could go <code>error.context::&lt;&amp;dyn ufmt::Display&gt;()</code> or w/e and get the error message via some other formatting trait</p>



<a name="211366616"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211366616" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211366616">(Sep 26 2020 at 15:56)</a>:</h4>
<p>its a little out of date tho, nika did all the work on the type erasure, I originally was just using Any but I was sad about it not supporting slices and dyn traits, so she fixed it, more recently she updated it to be a much nicer implementation and that's living in a PR over here <a href="https://github.com/mystor/object-provider/pull/3">https://github.com/mystor/object-provider/pull/3</a></p>



<a name="211366652"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211366652" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211366652">(Sep 26 2020 at 15:57)</a>:</h4>
<p>but in theory this method could supercede <code>source</code>, <code>backtrace</code>, <code>Display</code>, and<code>Debug</code> as a way to get access to inner values of the error</p>



<a name="211366695"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211366695" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211366695">(Sep 26 2020 at 15:58)</a>:</h4>
<p>and it can be used for upcasting, which is what you'd be doing for an alternate fmt trait</p>



<a name="211366745"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211366745" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211366745">(Sep 26 2020 at 15:59)</a>:</h4>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="w">            </span><span class="k">fn</span> <span class="nf">provide</span><span class="o">&lt;'</span><span class="na">a</span><span class="o">&gt;</span><span class="p">(</span><span class="o">&amp;'</span><span class="na">a</span><span class="w"> </span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">request</span>: <span class="kp">&amp;</span><span class="nc">mut</span><span class="w"> </span><span class="n">Request</span><span class="o">&lt;'</span><span class="na">a</span><span class="o">&gt;</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                </span><span class="n">request</span><span class="w"></span>
<span class="w">                    </span><span class="p">.</span><span class="n">provide_ref</span>::<span class="o">&lt;&amp;</span><span class="k">dyn</span><span class="w"> </span><span class="n">MyFavoriteDisplayAlternative</span><span class="o">&gt;</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">);</span><span class="w"></span>
<span class="w">            </span><span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="211366793"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211366793" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211366793">(Sep 26 2020 at 16:00)</a>:</h4>
<p>back on topic tho, trying to figure out how to do this hook change and I'm quite lost ^_^</p>



<a name="211366815"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211366815" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211366815">(Sep 26 2020 at 16:00)</a>:</h4>
<p>trying to figure out how the panic hooks in core are configured, but i expect its going to be quite a lot to dig into because I think they're built into the language</p>



<a name="211366817"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211366817" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211366817">(Sep 26 2020 at 16:00)</a>:</h4>
<p>implemented</p>



<a name="211366818"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211366818" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211366818">(Sep 26 2020 at 16:00)</a>:</h4>
<p>whatever</p>



<a name="211366834"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211366834" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211366834">(Sep 26 2020 at 16:01)</a>:</h4>
<p>no you define your own</p>



<a name="211366840"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211366840" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211366840">(Sep 26 2020 at 16:01)</a>:</h4>
<p>theres some fn's that you have to define right</p>



<a name="211366842"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211366842" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211366842">(Sep 26 2020 at 16:01)</a>:</h4>
<p>im looking at this</p>



<a name="211366843"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211366843" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211366843">(Sep 26 2020 at 16:01)</a>:</h4>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">extern</span><span class="w"> </span><span class="s">"C"</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">__rust_panic_cleanup</span><span class="p">(</span><span class="n">payload</span>: <span class="o">*</span><span class="k">mut</span><span class="w"> </span><span class="kt">u8</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="o">*</span><span class="k">mut</span><span class="w"> </span><span class="p">(</span><span class="k">dyn</span><span class="w"> </span><span class="n">Any</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="nb">Send</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="o">'</span><span class="nb">static</span><span class="p">);</span><span class="w"></span>

<span class="w">    </span><span class="sd">/// `payload` is actually a `*mut &amp;mut dyn BoxMeUp` but that would cause FFI warnings.</span>
<span class="w">    </span><span class="sd">/// It cannot be `Box&lt;dyn BoxMeUp&gt;` because the other end of this call does not depend</span>
<span class="w">    </span><span class="sd">/// on liballoc, and thus cannot use `Box`.</span>
<span class="w">    </span><span class="cp">#[unwind(allowed)]</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">__rust_start_panic</span><span class="p">(</span><span class="n">payload</span>: <span class="kt">usize</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="kt">u32</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="211366919"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211366919" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211366919">(Sep 26 2020 at 16:02)</a>:</h4>
<p>TIL libpanic is its own thing</p>



<a name="211366947"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211366947" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211366947">(Sep 26 2020 at 16:03)</a>:</h4>
<p>neat</p>



<a name="211367009"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211367009" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211367009">(Sep 26 2020 at 16:04)</a>:</h4>
<p>oh theres two<br>
libpanic_abort and libpanic_unwind</p>



<a name="211367020"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211367020" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211367020">(Sep 26 2020 at 16:05)</a>:</h4>
<p>that must be how they switch the panic behaviour based on the config</p>



<a name="211367030"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211367030" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211367030">(Sep 26 2020 at 16:05)</a>:</h4>
<p>but that also means I'm probably too far, because libpanic_abort's impl doesn't seem to pass the payload into any other functions</p>



<a name="211367036"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211367036" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211367036">(Sep 26 2020 at 16:05)</a>:</h4>
<p>and I'm 99% sure panic handlers still get called before abort</p>



<a name="211367042"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211367042" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211367042">(Sep 26 2020 at 16:05)</a>:</h4>
<p>so there must be something else that is happening first, gonna start tracing down thru the panic macro I guess</p>



<a name="211367194"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211367194" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211367194">(Sep 26 2020 at 16:08)</a>:</h4>
<p>there it is, this is the lang item i was looking for</p>



<a name="211367195"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211367195" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211367195">(Sep 26 2020 at 16:08)</a>:</h4>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">extern</span><span class="w"> </span><span class="s">"Rust"</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="cp">#[lang = </span><span class="s">"panic_impl"</span><span class="cp">]</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">panic_impl</span><span class="p">(</span><span class="n">pi</span>: <span class="kp">&amp;</span><span class="nc">PanicInfo</span><span class="o">&lt;'</span><span class="nb">_</span><span class="o">&gt;</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="o">!</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="211367333"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211367333" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211367333">(Sep 26 2020 at 16:11)</a>:</h4>
<p>i have no idea where this goes, can't find an instance of it being implemented in <code>std</code> D:</p>



<a name="211367391"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211367391" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211367391">(Sep 26 2020 at 16:12)</a>:</h4>
<div class="codehilite"><pre><span></span><code>
</code></pre></div>



<a name="211367393"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211367393" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211367393">(Sep 26 2020 at 16:13)</a>:</h4>
<div class="codehilite"><pre><span></span><code>1. In `src/librustc_middle/middle/weak_lang_items.rs`, `panic_impl` is declared as &#39;weak lang item&#39;,
   with the symbol `rust_begin_unwind`. This is used in `librustc_typeck/collect.rs`
   to set the actual symbol name to `rust_begin_unwind`.

   Note that `panic_impl` is declared in an `extern &quot;Rust&quot;` block,
   which means that libcore will attempt to call a foreign symbol called `rust_begin_unwind`
   (to be resolved at link time)
</code></pre></div>



<a name="211368212"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211368212" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211368212">(Sep 26 2020 at 16:32)</a>:</h4>
<p>here's my extremely vague guess at what has to be done <a href="https://github.com/rust-lang/project-error-handling/issues/3#issuecomment-699516309">https://github.com/rust-lang/project-error-handling/issues/3#issuecomment-699516309</a></p>



<a name="211368219"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211368219" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211368219">(Sep 26 2020 at 16:32)</a>:</h4>
<p>I think im going to explore the global allocator stuff now</p>



<a name="211368223"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211368223" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211368223">(Sep 26 2020 at 16:32)</a>:</h4>
<p>since its apparently similar</p>



<a name="211368233"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211368233" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211368233">(Sep 26 2020 at 16:33)</a>:</h4>
<p>maybe its easier to understand or closer to what we need for backtrace</p>



<a name="211369653"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211369653" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211369653">(Sep 26 2020 at 17:06)</a>:</h4>
<p>So in no_std, the panic_handler is called as soon as the panic starts, and it's up to the panic handler to never return (aborting is <em>one</em> way you might do this).</p>



<a name="211369698"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211369698" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211369698">(Sep 26 2020 at 17:08)</a>:</h4>
<p>in std, i believe the ordering is that the panic starts, then the runtime's built in panic_handler calls the panic hook (which prints your panic message to stderr by default), then the runtime's panic_handler will either abort or unwind after the panic_hook returns.</p>



<a name="211525349"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211525349" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211525349">(Sep 28 2020 at 17:45)</a>:</h4>
<p>examples of libs that Lokathor is talking about:</p>
<ul>
<li><a href="https://github.com/japaric/ufmt">https://github.com/japaric/ufmt</a></li>
<li><a href="https://github.com/knurling-rs/defmt">https://github.com/knurling-rs/defmt</a></li>
</ul>



<a name="211526218"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211526218" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211526218">(Sep 28 2020 at 17:52)</a>:</h4>
<p>At the risk of sounding silly, I feel like part of the problem is that we want viewable errors to have whatever encoding works for the platform, but they should still be parseable. In some computers, historically, that has been a series of beeps. However, fmt::Display is entangled with a concept of specifically <em>text</em> formatting, which is very important, but not the same.</p>



<a name="211863793"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211863793" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211863793">(Oct 01 2020 at 02:46)</a>:</h4>
<p>still early days but I've started working on the proof of concept :D <a href="https://github.com/rust-lang/rust/pull/77384/files">https://github.com/rust-lang/rust/pull/77384/files</a></p>



<a name="211863797"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/211863797" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#211863797">(Oct 01 2020 at 02:46)</a>:</h4>
<p>rn it doesn't even compile let alone work but I'll hopefully get it in a working state tomorrow</p>



<a name="212138283"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/212138283" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#212138283">(Oct 02 2020 at 22:58)</a>:</h4>
<p>Any progress <span aria-label="smile" class="emoji emoji-1f642" role="img" title="smile">:smile:</span></p>



<a name="212138440"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/212138440" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#212138440">(Oct 02 2020 at 23:00)</a>:</h4>
<p>I'm having trouble adding <code>core_backtrace</code> to the symbols proc macro</p>



<a name="212138508"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/212138508" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#212138508">(Oct 02 2020 at 23:01)</a>:</h4>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="n">error</span>: <span class="nc">Symbol</span><span class="w"> </span><span class="err">`</span><span class="n">compile_error</span><span class="err">`</span><span class="w"> </span><span class="n">must</span><span class="w"> </span><span class="n">precede</span><span class="w"> </span><span class="err">`</span><span class="n">core_backtrace</span><span class="err">`</span><span class="w"></span>
<span class="n">error</span>: <span class="nc">proc</span><span class="w"> </span><span class="kr">macro</span><span class="w"> </span><span class="n">panicked</span><span class="w"></span>
<span class="w">    </span><span class="o">-</span>-&gt; <span class="nc">compiler</span><span class="o">/</span><span class="n">rustc_span</span><span class="o">/</span><span class="n">src</span><span class="o">/</span><span class="n">symbol</span><span class="p">.</span><span class="n">rs</span>:<span class="mi">22</span>:<span class="mi">1</span><span class="w"></span>
<span class="w">     </span><span class="o">|</span><span class="w"></span>
<span class="mi">22</span><span class="w">   </span><span class="o">|</span><span class="w"> </span><span class="o">/</span><span class="w"> </span><span class="n">symbols</span><span class="o">!</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="mi">23</span><span class="w">   </span><span class="o">|</span><span class="w"> </span><span class="o">|</span><span class="w">     </span><span class="c1">// After modifying this list adjust `is_special`, `is_used_keyword`/`is_unused_keyword`,</span>
<span class="mi">24</span><span class="w">   </span><span class="o">|</span><span class="w"> </span><span class="o">|</span><span class="w">     </span><span class="c1">// this should be rarely necessary though if the keywords are kept in alphabetic order.</span>
<span class="mi">25</span><span class="w">   </span><span class="o">|</span><span class="w"> </span><span class="o">|</span><span class="w">     </span><span class="n">Keywords</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="o">..</span><span class="p">.</span><span class="w">    </span><span class="o">|</span><span class="w"></span>
<span class="mi">1196</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="o">|</span><span class="w">     </span><span class="p">}</span><span class="w"></span>
<span class="mi">1197</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="w">     </span><span class="o">|</span><span class="w"> </span><span class="o">|</span><span class="n">_</span><span class="o">^</span><span class="w"></span>
<span class="w">     </span><span class="o">|</span><span class="w"></span>
<span class="w">     </span><span class="o">=</span><span class="w"> </span><span class="n">help</span>: <span class="nc">message</span>: <span class="nc">errors</span><span class="w"> </span><span class="k">in</span><span class="w"> </span><span class="err">`</span><span class="n">Keywords</span><span class="err">`</span><span class="w"> </span><span class="n">and</span><span class="o">/</span><span class="n">or</span><span class="w"> </span><span class="err">`</span><span class="n">Symbols</span><span class="err">`</span><span class="w"></span>
</code></pre></div>



<a name="212138610"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/212138610" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#212138610">(Oct 02 2020 at 23:02)</a>:</h4>
<p>ez fix <span aria-label="laughing" class="emoji emoji-1f606" role="img" title="laughing">:laughing:</span></p>



<a name="212142901"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/212142901" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#212142901">(Oct 03 2020 at 00:10)</a>:</h4>
<p>i got some more work done yesterday so now it has that <code>core_backtrace</code> feature and it compiles but doesn't pass tests, but I haven't done any more work today and probably wont due to some pretty fked up air quality and heat in SF today</p>



<a name="212142927"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/212142927" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#212142927">(Oct 03 2020 at 00:11)</a>:</h4>
<p>extremely hard to focus when I have to close all the windows in an apartment with no air conditioning, its rather miserable in here today</p>



<a name="212143740"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/212143740" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oliver <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#212143740">(Oct 03 2020 at 00:25)</a>:</h4>
<p>Yeah I've been hearing about it from friends</p>



<a name="212146888"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/Stabilizing%20Backtrace%20/%20Core%20Error%20Proof%20of%20Concept/near/212146888" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ashley Mannix <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/Stabilizing.20Backtrace.20.2F.20Core.20Error.20Proof.20of.20Concept.html#212146888">(Oct 03 2020 at 01:43)</a>:</h4>
<p>Oh yikes! Stay safe <span aria-label="sweat" class="emoji emoji-1f613" role="img" title="sweat">:sweat:</span> Bushfires are the pits</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>